Backport XML documentation for WebProxy and IWebProxyScript#124396
Backport XML documentation for WebProxy and IWebProxyScript#124396
Conversation
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
src/libraries/System.Net.WebProxy/src/System/Net/IWebProxyScript.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.WebProxy/src/System/Net/IWebProxyScript.cs
Outdated
Show resolved
Hide resolved
…descriptions, update IWebProxyScript remarks Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Done in commit 0287cd0. Removed |
There was a problem hiding this comment.
Pull request overview
This PR backports XML documentation from dotnet-api-docs for System.Net.WebProxy and System.Net.IWebProxyScript to their source implementations, following the pattern established in PR #124227. The documentation adds comprehensive API descriptions including type-level remarks, constructor documentation, property and method documentation with proper XML conventions.
Changes:
- Removed
UseCompilerGeneratedDocXmlFileproperty from the project file to enable compiler-generated XML documentation - Added comprehensive XML documentation for WebProxy class covering 11 constructors, 6 properties, and 3 methods including WPAD support details
- Added XML documentation for IWebProxyScript interface covering all interface members with WPAD/PAC implementation details
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj | Removed UseCompilerGeneratedDocXmlFile property to enable compiler-generated documentation |
| src/libraries/System.Net.WebProxy/src/System/Net/WebProxy.cs | Added comprehensive XML documentation for class, constructors, properties, and methods (239 lines total) |
| src/libraries/System.Net.WebProxy/src/System/Net/IWebProxyScript.cs | Added XML documentation for interface and all methods with WPAD/PAC details |
src/libraries/System.Net.WebProxy/src/System/Net/IWebProxyScript.cs
Outdated
Show resolved
Hide resolved
| /// <param name="scriptLocation">Internal only.</param> | ||
| /// <param name="script">Internal only.</param> | ||
| /// <param name="helperType">Internal only.</param> | ||
| /// <returns>A <see cref="bool"/> indicating whether the script was successfully loaded.</returns> | ||
| bool Load(Uri scriptLocation, string script, Type helperType); | ||
|
|
||
| /// <summary> | ||
| /// Runs a script. | ||
| /// </summary> | ||
| /// <param name="url">Internal only.</param> | ||
| /// <param name="host">Internal only.</param> | ||
| /// <returns> | ||
| /// A <see cref="string"/>. | ||
| /// An internal-only value returned. |
There was a problem hiding this comment.
The parameter descriptions "Internal only." and return value description "An internal-only value returned." are not helpful for API documentation. If these are truly internal-only, the type-level documentation should clarify the intended usage. Otherwise, provide meaningful descriptions of what these parameters and return values represent.
| /// <param name="scriptLocation">Internal only.</param> | |
| /// <param name="script">Internal only.</param> | |
| /// <param name="helperType">Internal only.</param> | |
| /// <returns>A <see cref="bool"/> indicating whether the script was successfully loaded.</returns> | |
| bool Load(Uri scriptLocation, string script, Type helperType); | |
| /// <summary> | |
| /// Runs a script. | |
| /// </summary> | |
| /// <param name="url">Internal only.</param> | |
| /// <param name="host">Internal only.</param> | |
| /// <returns> | |
| /// A <see cref="string"/>. | |
| /// An internal-only value returned. | |
| /// <param name="scriptLocation"> | |
| /// The URI that identifies the script to use for automatic proxy detection. | |
| /// </param> | |
| /// <param name="script"> | |
| /// The script content to load and prepare for execution. | |
| /// </param> | |
| /// <param name="helperType"> | |
| /// The type that provides helper methods or services available to the script at runtime. | |
| /// </param> | |
| /// <returns>A <see cref="bool"/> indicating whether the script was successfully loaded.</returns> | |
| bool Load(Uri scriptLocation, string script, Type helperType); | |
| /// <summary> | |
| /// Runs a script. | |
| /// </summary> | |
| /// <param name="url"> | |
| /// The full destination URL for which proxy information is requested. | |
| /// </param> | |
| /// <param name="host"> | |
| /// The host name associated with the destination URL. | |
| /// </param> | |
| /// <returns> | |
| /// A <see cref="string"/> that describes how to connect to the destination, such as a proxy configuration | |
| /// directive (for example, <c>"DIRECT"</c> or <c>"PROXY host:port"</c>). |
| /// The <see cref="GetDefaultProxy"/> method returns an instance of the <see cref="WebProxy"/> class with the <see cref="Address"/>, <see cref="BypassProxyOnLocal"/>, and <see cref="BypassList"/> properties set to the values used by the local computer. | ||
| /// </para> | ||
| /// <para> | ||
| /// The <see cref="T:System.Net.GlobalProxySelection.Select"/> method returns an instance of the <see cref="WebProxy"/> class with its properties set according to a combination of Internet and configuration file settings. |
There was a problem hiding this comment.
The GlobalProxySelection.Select property referenced here is obsolete (see line 31 issue). Consider updating this reference to use a non-obsolete API or removing this paragraph if it's no longer relevant.
There was a problem hiding this comment.
| /// The <see cref="T:System.Net.GlobalProxySelection.Select"/> method returns an instance of the <see cref="WebProxy"/> class with its properties set according to a combination of Internet and configuration file settings. | |
| /// In .NET Framework, the <see cref="T:System.Net.GlobalProxySelection.Select"/> method returns an instance of the <see cref="WebProxy"/> class with its properties set according to a combination of Internet and configuration file settings. | |
| /// In modern .NET, this method is obsolete. |
There was a problem hiding this comment.
Fixed in commit 5b2e4c9. Removed the entire paragraph referencing obsolete GlobalProxySelection.Select.
src/libraries/System.Net.WebProxy/src/System/Net/IWebProxyScript.cs
Outdated
Show resolved
Hide resolved
| /// The <see cref="GetDefaultProxy"/> method returns an instance of the <see cref="WebProxy"/> class with the <see cref="Address"/>, <see cref="BypassProxyOnLocal"/>, and <see cref="BypassList"/> properties set to the values used by the local computer. | ||
| /// </para> | ||
| /// <para> | ||
| /// The <see cref="T:System.Net.GlobalProxySelection.Select"/> method returns an instance of the <see cref="WebProxy"/> class with its properties set according to a combination of Internet and configuration file settings. |
There was a problem hiding this comment.
| /// The <see cref="T:System.Net.GlobalProxySelection.Select"/> method returns an instance of the <see cref="WebProxy"/> class with its properties set according to a combination of Internet and configuration file settings. | |
| /// In .NET Framework, the <see cref="T:System.Net.GlobalProxySelection.Select"/> method returns an instance of the <see cref="WebProxy"/> class with its properties set according to a combination of Internet and configuration file settings. | |
| /// In modern .NET, this method is obsolete. |
…lete API references, improve parameter descriptions Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
Backports XML documentation from dotnet-api-docs for
System.Net.WebProxyandSystem.Net.IWebProxyScriptto their source implementations, per instructions in #124227.Changes
System.Net.WebProxy.csproj - Updated project configuration:
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>to enable compiler-generated XML documentationWebProxy.cs - Added XML docs for:
WebProxy(SerializationInfo, StreamingContext)constructor andGetObjectDatamethod withPlatformNotSupportedExceptiondocumentationAddress,BypassProxyOnLocal,BypassList,BypassArrayList,Credentials,UseDefaultCredentialsGetProxy,IsBypassed,GetDefaultProxyIWebProxyScript.cs - Added XML docs for:
Close(),Load(),Run()with meaningful parameter descriptions and WPAD/PAC implementation details in remarksAll documentation uses proper C# XML conventions with
<see langword="null"/>for keywords,<see cref="T:TypeName"/>for external type references, and simplified parameter descriptions. Documentation has been refined to:Source:
Impact: 234 lines of documentation added across 3 files
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.